<template>
  <div class="">
    <div class="navtag">
      <div :class="navId == 1 ? 'hover-red' : ''" @click="tabNav((id = 1))">
        系统消息
      </div>
      <div :class="navId == 2 ? 'hover-red' : ''" @click="tabNav((id = 2))">
        通知消息
      </div>
    </div>
    <div class="system" v-if="navId == 1">
      <div class="syatem-item" v-for="item in 4" :key="item">
        <div class="avatar"><img src="@/assets/imgs/asarts.png" alt="" /></div>
        <div class="center">
          <div class="tit">
            <div class="">系统消息</div>
            <div class=""><img src="@/assets/imgs/del.png" alt="" /></div>
          </div>
          <div class="word">
            平台将于2021年10月14日-16日更新维护，期间可能会出现平台将于2021年10月14日-16日更新维护，期间可能会出现平台将于2021年10月14日-16日更新维护，期间可能会出现卡顿现象。
          </div>
          <div class="time">2021.10.14</div>
        </div>
      </div>
      <div class="more">点击查看更多</div>
    </div>
    <div class="notify" v-else>
      <div class="notify-item" v-for="item in 3" :key="item">
        <div class="tit">
          <div class="reply">您的咨询答疑已回复</div>
          <div class="time">2021.10.14</div>
        </div>
        <div class="view">咨询答疑提出的问题简介展示位置</div>
      </div>
      <div class="more">点击查看更多</div>
    </div>
  </div>
</template>

<script>
export default {
  name: "news",
  components: {},
  data() {
    return { navId: 1 };
  },

  methods: {
    tabNav(id) {
      this.navId = id;
    }
  }
};
</script>

<style lang="scss" scoped>
.navtag {
  height: 55px;
  display: flex;
  border-bottom: 1px solid #eaeaea;
  color: #666666;
  font-size: 18px;
  line-height: 55px;
  div {
    width: 230px;
    text-align: center;
    cursor: pointer;
  }
  .hover-red {
    border-bottom: 5px solid #b21315;
  }
}
.system {
  padding: 30px 0 0 40px;
  .syatem-item {
    padding: 15px 0 0;
    height: 140px;
    display: flex;
    margin-right: 200px;
    .avatar {
      img {
        width: 24px;
        height: 24px;
      }

      margin-right: 5px;
    }
    .center {
      border-bottom: 1px dashed #d1d1d1;
      .tit {
        display: flex;
        justify-content: space-between;
      }
      .tit > div:nth-child(1) {
        color: #666666;
        font-size: 18px;
        font-weight: 700;
      }
      .tit > div:nth-child(2) {
        width: 20px;
        height: 20px;
      }
      .word {
        margin-top: 10px;
        margin-bottom: 15px;
        padding-right: 50px;
        color: #333333;
        font-size: 16px;
        line-height: 26px;
      }
      .time {
        color: #999999;
        font-size: 16px;
      }
    }
  }
  .more {
    width: 420px;
    height: 44px;
    background-color: #e4e4e4;
    border-radius: 5px;
    color: #666666;
    font-size: 18px;
    text-align: center;
    line-height: 44px;
    margin: 30px auto 0;
  }
}
.notify {
  padding: 50px 0 0 40px;
  .more {
    width: 420px;
    height: 44px;
    background-color: #e4e4e4;
    border-radius: 5px;
    color: #666666;
    font-size: 18px;
    text-align: center;
    line-height: 44px;
    margin: 30px auto 0;
  }
  .notify-item {
    margin-right: 200px;
    border-bottom: 1px dashed #d1d1d1;
    .tit {
      margin-top: 20px;
      display: flex;
      justify-content: space-between;

      .reply {
        font-weight: 700;
        color: #666666;
        font-size: 20px;
      }
      .time {
        color: #999999;
        font-size: 16px;
      }
    }
    .view {
      height: 57px;
      background-color: #f4f4f4;
      border-radius: 5px;
      line-height: 57px;
      padding-left: 30px;
      color: #999999;
      font-size: 18px;
      margin: 20px 0 40px;
    }
  }
}
</style>
